<style scoped src="./index.scss" lang="scss" rel="stylesheet/scss"></style>
<template src="./index.html"></template>
<script>
export default {
    mixins: [Vue.prototype.$vFN.Mixins.Base, Vue.prototype.$vFN.Mixins.Edit],
    components: {
        SelectImageRadio: async () =>
            Vue.extend(await Vue.prototype.$vFN.Components.Base.SelectImageRadio()),
    },
    data() {
        return {
            appWindow: window,
            mobile: "",
            realName: "",
            form: {
                // 站点名称
                name: "",
                // logo
                logoImg: "",
                // 过期类型
                type: 1,
                // 过期时间
                validityTime: "",
                // 管理员
                umsAdminId: "",
                // 备注信息
                remark: "",
            },

            // 页面接口地址
            apiUrl: {
                create: "mall-site-portal/platform/create",
                update: "mall-site-portal/platform/update",
                detail: "mall-site-portal/platform/getItem",
            },
        };
    },
    methods: {
        SelectPlatformAdmin() {
            this.$vFN.Directives.SelectPlatformAdmin({
                appWindow: this.appWindow,
                onSuccess: (res) => {
                    this.form.umsAdminId = res.data.id;
                    this.mobile = res.data.mobile;
                    this.realName = res.data.realName;
                    console.error(res);
                },
            });
        },
        // 编辑修改的参数扩展方法
        mixinEdit_editDataExtend(data_) {
          

            if (this.mixinEdit_editType == "update") {
                this.mobile = data_.umsAdmin.mobile;
                this.realName = data_.umsAdmin.realName;
            }

            return data_;
        },
        // 初始化
        async init() {
            // 初始化数据
            await this.mixinEdit_editBoxInit({
                model: "form",
                id: this.id,
            });
        },

    },
    mounted() {
        this.init();
    },
    activated() {},
};
</script>